Practical, Low-Effort Equivalence Verification of Real Code

نویسندگان

  • David A. Ramos
  • Dawson R. Engler
چکیده

Verifying code equivalence is useful in many situations, such as checking: yesterday’s code against today’s, different implementations of the same (standardized) interface, or an optimized routine against a reference implementation. We present a tool designed to easily check the equivalence of two arbitrary C functions. The tool provides guarantees far beyond those possible with testing, yet it often requires less work than writing even a single test case. It automatically synthesizes inputs to the routines and uses bit-accurate, sound symbolic execution to verify that they produce equivalent outputs on a finite number of paths, even for rich, nested data structures. We show that the approach works well, even on heavily-tested code, where it finds interesting errors and gets high statement coverage, often exhausting all feasible paths for a given input size. We also show how the simple trick of checking equivalence of identical code turns the verification tool chain against itself, finding errors in the underlying compiler and verification tool.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Automatic Verification of Source Code Transformations on Array-Intensive Programs: Demonstration with Real-life Examples

We have recently developed a method for verification of source code transformations applied on array-intensive programs typically found in signal processing and high performance computing applications. The method is based on checking the equivalence of the original and the transformed programs belonging to a decidable class that is still of practical interest. In this report, using a prototype ...

متن کامل

Verifiable Embedded Real-Time Application Framework

Currently available application frameworks that target at the automatic design of real-time embedded software are poor in integrating functional and nonfunctional requirements for real-time embedded systems. In this work, we present the internal architecture and design flow of a newly proposed framework called Verifiable Embedded Real-Time Application Framework (VERTAF), which integrates three ...

متن کامل

Evaluation of the RtDosePlan Treatment Planning System using Radiochromic Film and Monte Carlo Simulation

Introduction: GafChromic EBT films are one of the self-developing and modern films commercially available for dosimetric verification of treatment planning systems (TPSs). Their high spatial resolution, low energy dependence and near-tissue equivalence make them suitable for verification of dose distributions in radiation therapy. This study was designed to evaluate the dosimetric parameters of...

متن کامل

Best Practices for a MATLAB to C Workflow Using Real-Time Workshop

www.mathworks.com Manually translating MATLAB to C involves incorporating into the code low-level details such as data-type assignments, memory allocations, and optimizations for computational load and memory. A great deal of effort is required to ensure that the MATLAB code and the C code remain equivalent. When your MATLAB algorithm uses the Embedded MATLABTM language subset, the translation ...

متن کامل

Automatic Rootcausing for Program Equivalence Failures in Binaries

Equivalence checking of imperative programs has several applications including compiler validation and cross-version verification. Debugging equivalence failures can be tedious for large examples, especially for low-level binary programs. In this paper, we formalize a simple yet precise notion of verifiable rootcause for equivalence failures that leverages semantic similarity between two progra...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011